﻿Imports DataSet_apaTableAdapters
Imports System.Data.SqlClient
Imports TarjetaA
Partial Class Reportes_TarjetaA
    Inherits System.Web.UI.Page
    Dim Animales As New animalTableAdapter
    Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TxtAnimal.TextChanged
        Dim Animales As New animalTableAdapter
        Dim reporteResumen As New TarjetaA

        gvAnimales.DataSource = Animales.GetAnimalByClave(TxtAnimal.Text)
        gvAnimales.DataBind()
        TxtAnimal.Focus()
        WebViewerResumen.Report = reporteResumen

    End Sub

    Protected Sub gvAnimales_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles gvAnimales.PageIndexChanging
        gvAnimales.PageIndex = e.NewPageIndex
        gvAnimales.DataBind()
    End Sub

    Protected Sub gvAnimales_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles gvAnimales.SelectedIndexChanged

        Dim reporteResumen As New TarjetaA
        WebViewerResumen.Report = reporteResumen
        reporteResumen.Parameters("parameter1").Value = gvAnimales.SelectedRow.Cells(9).Text
        WebViewerResumen.Visible = True

    End Sub
    
End Class
